package com.boot.stomp.client;

import com.boot.json.deserializer.StringToLongDeserializer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.Set;

/**
 * @author 霜寒 <1621856595@qq.com>
 * @description 账户信息
 * @date 2020/2/15 17:24
 **/
@Data
@SuperBuilder
@NoArgsConstructor
public class AccountInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @JsonDeserialize(using = StringToLongDeserializer.class)
    private Long id;

    private String username;

    private Boolean gender;

    private String nickname;

    private String phone;

    private String email;

    private String avatar;

    private Boolean rememberMe;

    private String ip;

    //    private Set<String> roles;

    @JsonProperty("authorities")
    private Set<String> accesses;

}
